home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
World of Video
/
World of Video.iso
/
programs
/
misc
/
aibb
/
68040_notes
< prev
next >
Wrap
Text File
|
1995-02-13
|
4KB
|
56 lines
A.I.B.B.
Amiga Intuition Based Benchmarks
Program Release Version 6.5
Copyright 1991-1993 LaMonte Koop
All Rights Reserved
MC68040 Users Notes
The Motorola MC68040 microprocessor, newest of the M680x0 series, is of
recent times seeing more use in various Amiga platforms. The 68040 is
a very versatile and quite advanced unit, capable of outperforming the earlier
M680x0 series microprocessors by great lengths. However, as with any
advanced processing unit as such, the greatest performance benefit is seen
when it is operating with code fine-tuned for it specifically. This can be
most easily seen with the 68040 in terms of floating-point operations.
The MC68040 contains a specialized floating point unit ( FPU )
internally, as opposed to such a unit being interfaced externally such as
the MC68030 and an MC68881 or MC68882 floating-point coprocessor. The FPU
within the 68040 is basically a fine-tuned sub-unit of the MC68882. It
supports the basic floating-point multiplication, division, addition, and
subtraction functions, as well as some of the other less complicated
operations. Unlike the MC68882 and MC68881 however, the complex
transcendental functions, such as sine, cosine, log functions, etc..., are
not hardware microcoded, and thus must be software emulated.
In order to maintain object code compatibility with the MC68881 and
MC68882, emulation packages for the transcendental functions and other
missing elements in the 68040 FPU have been developed for use. What these
packages do is perform the function desired and return the result once the
68040 take an unimplemented instruction exception upon encountering an
FPU call which is not included in this processor's FPU. This allows for
code previously utilized with the MC68881 and MC68882 to operate normally
with this processor, but it does contain a disadvantage.
When the 68040 takes the aformentioned exception trap, there is a
fair amount of CPU overhead involved. The current processor state must
be saved, and then the proper exception vector taken, which leads to the
emulated software function. All of this takes time, and in a code segment
having many calls to such unimplemented functions in the 68040, this can
lead to a somewhat noticable slowdown as compared to a straight MC68881 or
MC68882 interface on an earlier CPU. Despite this, let it not be thought
that the FPU on the 68040 is unusable for such features.
The instruction set supported by the built-in 68040 FPU is in fact
very fine-tuned, with such instructions being performed much faster than on
either the MC68881 or MC68882. Code specifically designed for the 68040
can take advantage of this by 'building' the transcendental functions out
of the existing functions ( the supported functions are in fact the building
blocks necessary for this ). Such functions designed this way, as either
a subroutine call or in-line code, will in fact execute FASTER than the
hardware supported MC68881 or MC68882 versions.
AIBB includes options for both 68881/68882 inline code, and 68040
optimized inline code for floating-point tests. The 68040 optimized test
code should be used whenever possible when operating on a 68040, but
to get a feel for how more 'common' code, which is designed for the
68881/68882, would function, feel free to use the standard coprocessor
code options.